package pacificlms.Verifiable.Database;

import pacificlms.Verifiable.*;

/**
 * InterLibraryLoan is a child of VerifiableObject dealing with Inter-Library Loans
 * Since all fields are get/set they are not individually commented
 * @author Brian Hume
 */
public class InterLibraryLoan extends VerifiableObject
{
    @Override
    public String TableName() {
        return "InterLibraryLoan";
    }
    
    private String LoanID;
    @VerifyAnnotation(ApplicationName="Loan ID", DBName="LoanID",  Type=TypeEnum.NUMERICSTRING, Length=11, PrimaryKey=true)
    public String LoanID(String value)
    {
        return LoanID = StandardProcess(LoanID, value);
    }
    
    
    private String SourceLibrary;
    @VerifyAnnotation(ApplicationName="Source Library", DBName="SourceLibrary",  Type=TypeEnum.STRING, Length=250, PrimaryKey=true)
    public String SourceLibrary(String value)
    {
        return SourceLibrary = StandardProcess(SourceLibrary, value);
    }
    
    
    private String LoanEndDate;
    @VerifyAnnotation(ApplicationName="Loan End Date", DBName="LoanEndDate",  Type=TypeEnum.DATE, Length=50)
    public String LoanEndDate(String value)
    {
        return LoanEndDate = StandardProcess(LoanEndDate, value);
    }
    
    @Override
    public String toString()
    {
        return "From " + SourceLibrary + " due back on" + LoanEndDate;
    }
}
